$('#recruit_time').datetimepicker({
    minView: "month",
    language: 'zh-CN',
    format: 'yyyy-mm-dd hh:ii',
    todayBtn: 1,
    autoclose: true,
    startDate:'2019-09-01 00:00',
});



var provenceArr = ["北京市","天津市","上海市","重庆市","河北省","山西省","内蒙古","辽宁省","吉林省","黑龙江省","江苏省","浙江省","安徽省","福建省","江西省","山东省","河南省","湖北省","湖南省","广东省","广西","海南省","四川省","贵州省","云南省","西藏","陕西省","甘肃省","青海省","宁夏","新疆","香港","澳门","台湾省"];
var cityArr = new Array();
cityArr["陕西省"] = ["西安市","延安市","铜川市","渭南市","咸阳市","宝鸡市","汉中市","榆林市","安康市","商洛市"];
cityArr["山西省"] = ["太原市","临汾市","大同市","吕梁市","阳泉市","运城市","晋中市","长治市","晋城市","朔州市","忻州市"];
cityArr["北京市"] = ["东城区","西城区","海淀区","朝阳区","丰台区","石景山区","门头沟区","通州区","顺义区","房山区","大兴区","昌平区","怀柔区","平谷区","密云区","延庆区"];
cityArr["上海市"] = ["黄浦区","浦东新区","徐汇区","长宁区","静安区","普陀区","虹口区","杨浦区","闵行区","宝山区","嘉定区","金山区","松江区","青浦区","奉贤区","崇明县"];
cityArr["天津市"] = ["和平区","河西区","南开区","河东区","河北区","红桥区","滨海新区","东丽区","西青区","津南区","北辰区","武清区","宝坻区","静海区​","蓟州区"];
cityArr["广东省"] = ["广州市","深圳市","佛山市","东莞市","中山市","珠海市","江门市","肇庆市","惠州市","汕头市","潮州市","揭阳市","阳江市","韶关市","梅州市","清远市"];
var countyArr = new Array();
countyArr["西安市"] = ["新城区","碑林区","莲湖区","灞桥区","未央区","雁塔区","阎良区","临潼区","长安区","蓝田县","周至县","户县","高陵区"];
countyArr["咸阳市"] = ["渭城区","秦都区","礼泉县","乾县","兴平","三原县","泾阳县","永寿县","彬县","长武县","旬邑县","淳化县","武功县"];
countyArr["商洛市"] = ["商州区","洛南县","丹凤县","商南县","山阳县","镇安县","柞水县"];
countyArr["渭南市"] = ["临渭区","华州区","潼关县","大荔县","蒲城县","澄城县","白水县","合阳县","富平县","韩城","华阴"];
countyArr["延安市"] = ["宝塔区","延长县","延川县","子长县","安塞县","志丹县","吴起县","甘泉县","富县","洛川县","宜川县","黄龙县","黄陵县"];
countyArr["铜川市"] = ["王益区","印台区","耀州区","宜君县"];
countyArr["宝鸡市"] = ["渭滨区","金台区","陈仓区","宝鸡蟠龙新区","宝鸡陆港新区","岐山县","扶风县","眉县","凤翔县","陇县","千阳县","麟游县","凤县","太白县"];
countyArr["汉中市"] = ["汉台区","南郑县","城固县","洋县","西乡县","勉县","宁强县","略阳县","镇巴县","留坝县" ,"佛坪县"];
countyArr["榆林市"] = ["榆阳区","横山区","神木县","绥德县","靖边县","定边县","府谷县","子洲县","米脂县","吴堡县","清涧县","佳县"];
countyArr["安康市"] = ["汉滨区","汉阴县","石泉县","宁陕县","紫阳县","岚皋县","平利县","镇坪县","旬阳县","白河县"];

var natureArr =["国有企业","国有控股企业","外资企业","合资企业","私营企业","事业单位","国家行政机关"];
var industryArr = ["农业","林业","畜牧业","渔业","计算机服务和软件业","采矿业","制造业"," 电力","燃气及水的生产和供应业","建筑业","交通运输","仓储和邮政业" ,"批发和零售业"," 住宿和餐饮业","金融业"," 房地产业"," 租赁和商务服务业" ,"科学研究","技术服务和地质勘查业"," 水利","环境和公共设施管理业" ,"居民服务和其他服务业", "教育","卫生医疗","社会保障和社会福利业" ,"文化、体育和娱乐业"]

window.onload = function () {
    allProvence();
    allNature();
    allIndustry();
    divFor();
};


function allIndustry(){
    var comp_kind = document.getElementById("comp_kind");
    for(var i = 0; i < industryArr.length; i++)
    {
        var o_l = new Option(industryArr[i],industryArr[i]);
        comp_kind.options.add(o_l);
    }
}

function allNature(){
    var comp_nature = document.getElementById("comp_nature");
    for(var i = 0; i < natureArr.length; i++)
    {
        var o_l = new Option(natureArr[i],natureArr[i]);
        comp_nature.options.add(o_l);
    }
}


function allProvence(){
    var comp_province = document.getElementById("comp_province");
    for(var i = 0; i < provenceArr.length; i++)
    {
        var o_l = new Option(provenceArr[i],provenceArr[i]);
        comp_province.options.add(o_l);
    }
}
function selectCity()
{
    var comp_province = document.getElementById("comp_province").value;
    var comp_city = document.getElementById("comp_city");
    comp_city.options.length = 0;
    if(comp_province == "")
    {
        var option = new Option("西安市","西安市");
        comp_city.options.add(option);
    }else{
        for(var i = 0; i < cityArr[comp_province].length; i++)
        {
            var o_l = new Option(cityArr[comp_province][i],cityArr[comp_province][i]);
            comp_city.options.add(o_l);
        }
    }
}

function selectCounty()
{
    var comp_city = document.getElementById("comp_city").value;
    var comp_county = document.getElementById("comp_county");
    comp_county.options.length = 0;
    if(comp_city == "")
    {
        var option = new Option("雁塔区","雁塔区");
        comp_county.options.add(option);
    }else{
        for(var i = 0; i < countyArr[comp_city].length; i++)
        {
            var o_l = new Option(countyArr[comp_city][i],countyArr[comp_city][i]);
            comp_county.options.add(o_l);
        }
    }
}


var username= window.sessionStorage.getItem("comp_u_name");
document.getElementById("currentuser").innerHTML = username;
function clicklogo(){
    window.location.href = "stushow";
}

function general(){
    window.location.href = "general";
}


function compattentstu(){
    window.location.href = "compattentstu";
}


function mycompattentstu(){
    window.location.href = "mycompattentstu";
}

function infostu(){
    window.location.href = "infostu";
}


function submitReleaseInfo(){
    var data = $( '#myFormInfoRelease').serialize();//表单序列化 form表单的id属性值
    $.ajax({
        url : 'info/submitReleaseInfo',
        type : "POST",
        data:data,
        success : function(result) {
            if(result=='已保存'){
                swal("信息发布成功!", "您发布的信息已经录入本系统!", "success");
            }else if(result=='未保存'){
                swal("请勿重复发布!", "您发布的信息已经存在与本系统!", "error");
                return false;
            }
        },
        error : function(data) {

        }
    });
}


function submitCompBaseInfo(){
    var comp_province = document.getElementById("comp_province").value;
    var comp_city = document.getElementById("comp_city").value;
    var comp_county = document.getElementById("comp_county").value;
    var data = $( '#myFormInfo').serialize();//表单序列化 form表单的id属性值
    data = data+"&comp_province ="+comp_province+"&comp_city="+comp_city+"&comp_county="+comp_county;
    $.ajax({
        url : 'user/submitCompBaseInfo',
        type : "POST",
        data:data,
        success : function(result) {
            if(result=='已保存'){
                swal("保存成功!", "企业基础信息已经录入本系统!", "success");
            }else{

            }
        },
        error : function(data) {

        }
    });
}




function selectCompBaseInfo(){



    $.ajax({
        url : 'user/selectCompBaseInfo',
        type : "POST",
        success : function(result) {
            if(result!=null){
                if(result.comp_name!='0'){
                    document.getElementById("comp_name").value=result.comp_name;
                }
                if(result.comp_name=='undefined'||result.comp_name==undefined){
                    document.getElementById("comp_name").value='';
                }

                if(result.comp_code!='0'){
                    document.getElementById("comp_code").value=result.comp_code;
                }
                if(result.comp_code=='undefined'||result.comp_code==undefined){
                    document.getElementById("comp_code").value='';
                }

                if(result.comp_nature!='0'){
                    document.getElementById("comp_nature").value=result.comp_nature;
                }
                if(result.comp_nature=='undefined'||result.comp_nature==undefined){
                    document.getElementById("comp_nature").value='';
                }

                if(result.comp_kind!='0'){
                    document.getElementById("comp_kind").value=result.comp_kind;
                }
                if(result.comp_kind=='undefined'||result.comp_kind==undefined){
                    document.getElementById("comp_kind").value='';
                }

                if(result.comp_address!='0'){
                    document.getElementById("comp_address").value=result.comp_address;
                }
                if(result.comp_address=='undefined'||result.comp_address==undefined){
                    document.getElementById("comp_address").value='';
                }

                if(result.comp_contact!='0'){
                    document.getElementById("comp_contact").value=result.comp_contact;
                }
                if(result.comp_contact=='undefined'||result.comp_contact==undefined){
                    document.getElementById("comp_contact").value='';
                }

                if(result.comp_contacttel!='0'){
                    document.getElementById("comp_contacttel").value=result.comp_contacttel;
                }
                if(result.comp_contacttel=='undefined'||result.comp_contacttel==undefined){
                    document.getElementById("comp_contacttel").value='';
                }

                if(result.comp_email!='0'){
                    document.getElementById("comp_email").value=result.comp_email;
                }
                if(result.comp_email=='undefined'||result.comp_email==undefined){
                    document.getElementById("comp_email").value='';
                }

                if(result.comp_province!='0'){
                    document.getElementById("comp_province").value=result.comp_province;
                }
                if(result.comp_province=='undefined'||result.comp_province==undefined){
                    document.getElementById("comp_province").value='';
                }

                if(result.comp_city!='0'){
                    // document.getElementById("stu_profession").value=result.stu_profession;
                    var option = document.createElement("option");
                    $(option).val(result.comp_city);
                    $(option).text(result.comp_city);
                    $('#comp_city').append(option);
                }
                if(result.comp_city=='undefined'||result.comp_city==undefined){
                    document.getElementById("comp_city").value='';
                }

                if(result.comp_county!='0'){
                    // document.getElementById("stu_profession").value=result.stu_profession;
                    var option = document.createElement("option");
                    $(option).val(result.comp_county);
                    $(option).text(result.comp_county);
                    $('#comp_county').append(option);
                }
                if(result.comp_county=='undefined'||result.comp_county==undefined){
                    document.getElementById("comp_county").value='';
                }

            }
        },
        error : function(data) {

        }
    });
}
function submitCompRecruitInfo(){
    var data = $( '#myFormRecruitInfo').serialize();//表单序列化 form表单的id属性值
    $.ajax({
        url : 'user/submitCompRecruitInfo',
        type : "POST",
        data:data,
        success : function(result) {
            if(result=='已保存'){
                swal("保存成功!", "企业招聘信息已经录入本系统!", "success");
            }else{

            }
        },
        error : function(data) {

        }
    });
}

function selectCompRecruitInfo(){
    $.ajax({
        url : 'user/selectCompRecruitInfo',
        type : "POST",
        success : function(result) {
            if(result!=null){
                if(result.comp_profile!='0'){
                    document.getElementById("comp_profile").value=result.comp_profile;
                }
                if(result.comp_profile=='undefined'||result.comp_profile==undefined){
                    document.getElementById("comp_profile").value='';
                }

                if(result.comp_cecruit!='0'){
                    document.getElementById("comp_cecruit").value=result.comp_cecruit;
                }
                if(result.comp_cecruit=='undefined'||result.comp_cecruit==undefined){
                    document.getElementById("comp_cecruit").value='';
                }

                if(result.comp_salary!='0'){
                    document.getElementById("comp_salary").value=result.comp_salary;
                }
                if(result.comp_salary=='undefined'||result.comp_salary==undefined){
                    document.getElementById("comp_salary").value='';
                }
            }
        },
        error : function(data) {

        }
    });
}



function deleteAcount(){
    swal({
        title: "确认注销账号吗?",
        text: "账号一旦注销,将无法找回,注册不易,且行且珍惜",
        icon : "warning",
        dangerMode : true,
        buttons : [ "考虑一下", "含泪注销"],
    }).then(function(ok){
        if (ok) {
            $.ajax({
                url : 'user/compdeleteAcount',
                method : 'delete',
                dataType : 'json',
                success : function(result) {
                    if(result == '已注销'){
                        swal("注销成功!", "期待您下次使用本系统!", "success");
                        window.location.href = "login";
                    }else{
                        swal("注销失败!", "你的账户目前不能被注销!", "error");
                    }
                },
                error : function(data) {
                    swal("注销成功!", "期待您下次使用本系统!", "success");
                    window.location.href = "login";
                }
            });
        }else{
            swal("很开心您放弃了本次操作!");
        }
    });


}

function loginout(){

    swal({
        title: "确认退出当前账号吗?",
        icon : "warning",
        dangerMode : true,
        buttons : [ "取消", "确认"],
    }).then(function(ok){
        if (ok) {
            $.ajax({
                url : "/user/comploginout",//url 统一资源定位符
                type : "POST",
                success : function(result) {
                    if(result == '已退出'){
                        window.location.href = "complogin";
                        swal("退出成功!", "再次登录请前往登陆页面", "success");
                    }else{
                        swal("退出失败!", "请检查网络或联系管理员", "error");
                    }
                },
                error : function(data) {
                    swal("退出成功!", "再次登录请前往登陆页面", "success");
                }
            });
        }else{
            swal("很开心您放弃了本次操作!");
        }
    });




}



function checkpwd(){
    var u_oldpwd = document.getElementById("u_oldpwd").value;
    if(u_oldpwd == null || u_oldpwd==''){
        swal("原密码不能为空!", "请输入原密码进行密码修改", "error");
        return false;
    }
    $.ajax({
        url : "/user/compcheckpwd?u_oldpwd="+u_oldpwd,//url 统一资源定位符
        type : "POST",
        success : function(result) {
            if(result == '密码存在'){

            }else{
                swal("原密码错误", "如忘记密码可在登录页进行忘记密码操作", "error");
            }
        },
        error : function(data) {

        }
    });
}

function submitpwd(){
    var u_newpwd = document.getElementById("u_newpwd").value;
    var u_surenewpwd = document.getElementById("u_surenewpwd").value;

    if(u_newpwd == null || u_newpwd==''){
        swal("新密码不能为空!", "请输入新密码进行密码修改", "error");
        return false;
    }

    if(u_newpwd.length<7){
        swal("新密码须超过6位!", "请重新输入", "error");
        document.getElementById("u_newpwd").value="";
        document.getElementById("u_surenewpwd").value="";
        return false;
    }
    if(u_newpwd != u_surenewpwd ){
        swal("两次密码不一致", "请重新输入密码", "error");
        document.getElementById("u_newpwd").value="";
        document.getElementById("u_surenewpwd").value="";
        return false;
    }
    $.ajax({
        url : "/user/compupdatepwd?u_newpwd="+u_newpwd,//url 统一资源定位符
        type : "POST",
        success : function(result) {
            if(result == '已修改'){
                swal("修改成功!", "下次登陆请使用新密码进行登录", "success");
            }else{
                swal("原密码错误", "如忘记密码可在登录页进行忘记密码操作", "error");
            }
        },
        error : function(data) {

        }
    });
}
var wangshenjob = null;
function divFor(){

    $.ajax({
        url : "/compOperat/selectStuOnline/",//url 统一资源定位符
        type : "POST",
        success : function(result) {
            var stuArr = result.data;

            for (var i=0;i<stuArr.length;i++){
                wangshenjob = stuArr[i].wangshenjob;
                a='<div class="col-md-4">';
                a='<div class="panel" style="width: 31.3%;float: left;margin-left: 2%;height: 250px" id="stuFor'+i+'">';
                a += '<p style="font-size: 16px;font-weight: 900;margin-left: 25%;margin-top: 20px">'+stuArr[i].stu_name+'</p>';
                a += '<p style="font-size: 12px;margin-left: 25%;color: #999">联系电话：'+stuArr[i].stu_tel+'</p>';
                a += '<span style="font-size: 12px;margin-left: 25%;color: #999">申请职位：'+stuArr[i].wangshenjob+'</span>';
                a += '<p style="font-size: 12px;margin-left: 25%;color: #333"><span>期望薪资：'+stuArr[i].stu_resume_salary+'</span></p>';
                a += '<p style="font-size: 12px;margin-left: 25%;color: #999">个人技能：'+stuArr[i].stu_resume_skills.substring(0,12)+'......</p>';

                if (stuArr[i].attent_status==0) {
                    a += '<button type="button" class="btn btn-primary" data-dismiss="modal" style="font-size: 12px;margin-left: 25%;margin-bottom: 24px;" id="' + stuArr[i].u_acount + '"  onclick="agreeOnlineApplication(this.id,'+i+')">同意网申</button>' +
                        '<button type="button" class="btn btn-danger" style="font-size: 12px;margin-bottom: 24px;margin-left: 20px;" id="' + stuArr[i].u_acount + '," onclick="disOnlineApplication(this.id,'+i+')">拒绝申请</button>'
                    +'<button type="button" class="btn btn-success" style="font-size: 12px;margin-bottom: 24px;margin-left: 20px;" id="' + stuArr[i].u_acount + '!" onclick="selectCountyStuInfo(this.id)" data-toggle="modal" data-target="#myModalStuInfo">查看详情</button>';
                }

                if (stuArr[i].attent_status==1) {
                    a += '<p style="font-size: 12px;margin-left: 25%;color: green;font-weight: 400">已经同意网申......</p>'
                        +'<div style="display: flex;flex-direction: row">'
                        +'<button type="button" class="btn btn-success" style="font-size: 12px;margin-bottom: 24px;margin-left: 30%;" id="' + stuArr[i].u_acount + '(" onclick="yuyuebishi(this.id,'+i+')">预约笔试</button>'
                        +'<button type="button" class="btn" style="font-size: 12px;margin-bottom: 24px;margin-left: 4%;" id="' + stuArr[i].u_acount + '!" onclick="selectCountyStuInfo(this.id)" data-toggle="modal" data-target="#myModalStuInfo">查看详情</button>';
                    +'</div>'
                }

                if (stuArr[i].attent_status==2) {
                    a += '<button type="button" class="btn btn-primary" data-dismiss="modal" style="font-size: 12px;margin-left: 25%;margin-bottom: 24px;" id="' + stuArr[i].u_acount + '," onclick="rebackOnlineApplication(this.id,'+i+')">撤销拒绝</button>'
                }
                if (stuArr[i].attent_status==3) {
                    a += '<p style="font-size: 12px;margin-left: 25%;color: green;font-weight: 400">已经发送笔试预约......</p>'
                }

                if (stuArr[i].attent_status==4) {
                    a += '<p style="font-size: 12px;margin-left: 25%;color: green;font-weight: 400">笔试同意......</p>'
                        +'<button type="button" class="btn btn-success" style="font-size: 12px;margin-bottom: 24px;margin-left: 30%;" id="' + stuArr[i].u_acount + '(" onclick="yuyuemianshi(this.id,'+i+')">预约面试</button>'
                        +'<button type="button" class="btn" style="font-size: 12px;margin-bottom: 24px;margin-left: 4%;" id="' + stuArr[i].u_acount + '!" onclick="selectCountyStuInfo(this.id)" data-toggle="modal" data-target="#myModalStuInfo">查看详情</button>';
                }

                if (stuArr[i].attent_status==5) {
                    a += '<p style="font-size: 12px;margin-left: 25%;color: green;font-weight: 400">已经发送面试预约......</p>'
                }


                if (stuArr[i].attent_status==6) {
                    a += '<p style="font-size: 12px;margin-left: 25%;color: green;font-weight: 400">面试同意......</p>'
                        +'<button type="button" class="btn btn-success" style="font-size: 12px;margin-bottom: 24px;margin-left: 30%;" id="' + stuArr[i].u_acount + '(" onclick="sendOffer(this.id,'+i+')">发放offer</button>'
                        +'<button type="button" class="btn" style="font-size: 12px;margin-bottom: 24px;margin-left: 4%;" id="' + stuArr[i].u_acount + '!" onclick="selectCountyStuInfo(this.id)" data-toggle="modal" data-target="#myModalStuInfo">查看详情</button>';
                }

                if (stuArr[i].attent_status==7) {
                    a += '<p style="font-size: 12px;margin-left: 25%;color: green;font-weight: 400">offer已发送......</p>'
                        +'<button type="button" class="btn" style="font-size: 12px;margin-bottom: 24px;margin-left: 40%;" id="' + stuArr[i].u_acount + '!" onclick="selectCountyStuInfo(this.id)" data-toggle="modal" data-target="#myModalStuInfo">查看详情</button>';
                }

                a+='</div>';
                a+='</div>';
                $(".divFor").append(a);
            }

        },
        error : function(data) {

        }
    });
}

function sendOffer(event,i){
    var arr = event.split("(");
    var stu_acount = arr[0];
    var html = $("#stuFor"+i+" span").html();
    var htmlarr = html.split("：");
    wangshenjob=htmlarr[1];
    $.ajax({
        url : "/compOperat/sendOffer?stu_acount="+stu_acount+"&wangshenjob="+wangshenjob,//url 统一资源定位符
        type : "POST",
        success : function(result) {

            if(result == '发送成功'){
                swal("发送成功!", "该学生已经收到您发送的offer", "success");
            }else{
                swal("预约失败", "请检查网络设置或者联系管理员", "error");
            }
        },
        error : function(data) {

        }
    });

}
function  yuyuemianshi(event,i){

    var arr = event.split("(");
    var stu_acount = arr[0];
    var html = $("#stuFor"+i+" span").html();

    var htmlarr = html.split("：");
    wangshenjob=htmlarr[1];
    $.ajax({
        url : "/compOperat/compyuyuemianshi?stu_acount="+stu_acount+"&wangshenjob="+wangshenjob,//url 统一资源定位符
        type : "POST",
        success : function(result) {

            if(result == '预约成功'){
                swal("预约成功!", "该学生已经收到您发送的面试邀请", "success");
            }else{
                swal("预约失败", "请检查网络设置或者联系管理员", "error");
            }
        },
        error : function(data) {

        }
    });

}

function  yuyuebishi(event,i) {
    var arr = event.split("(");
    var stu_acount = arr[0];
    var html = $("#stuFor"+i+" span").html();

    var htmlarr = html.split("：");
    wangshenjob=htmlarr[1];
    $.ajax({
        url : "/compOperat/compyuyuebishi?stu_acount="+stu_acount+"&wangshenjob="+wangshenjob,//url 统一资源定位符
        type : "POST",
        success : function(result) {

            if(result == '预约成功'){
                swal("预约成功!", "该学生已经收到您发送的笔试邀请", "success");
                location.reload();
            }else{
                swal("预约失败", "请检查网络设置或者联系管理员", "error");
            }
        },
        error : function(data) {

        }
    });
}
function selectCountyStuInfo(event){
    var arr = event.split("!");
    var stu_acount = arr[0];
    $.ajax({
        url : "/compOperat/selectCountyStuInfo?stu_acount="+stu_acount,//url 统一资源定位符
        type : "POST",
        success : function(result) {
            if(result!=null){
                if(result.stu_name!='0'){
                    document.getElementById("stu_name").innerHTML=result.stu_name;
                }
                if(result.stu_name!='0'){
                    document.getElementById("stu_name1").innerHTML=result.stu_name;
                }
                if(result.stu_sex!='0'){
                    document.getElementById("stu_sex").innerHTML=result.stu_sex;
                }
                if(result.stu_sex!='0'){
                    document.getElementById("stu_politics").innerHTML=result.stu_politics;
                }
                if(result.stu_email!='0'){
                    document.getElementById("stu_email").innerHTML=result.stu_email;
                }
                if(result.stu_tel!='0'){
                    document.getElementById("stu_tel").innerHTML=result.stu_tel;
                }
                if(result.stu_qq!='0'){
                    document.getElementById("stu_qq").innerHTML=result.stu_qq;
                }

                if(result.stu_address!='0'){
                    document.getElementById("stu_address").innerHTML=result.stu_address;
                }
                if(result.stu_fromaddress!='0'){
                    document.getElementById("stu_fromaddress").innerHTML=result.stu_fromaddress;
                }
                if(result.stu_schoolname!='0'){
                    document.getElementById("stu_schoolname").innerHTML=result.stu_schoolname;
                }

                if(result.stu_department!='0'){
                    document.getElementById("stu_department").innerHTML=result.stu_department;
                }
                if(result.stu_profession!='0'){
                    document.getElementById("stu_profession").innerHTML=result.stu_profession;
                }

                if(result.stu_education!='0'){
                    document.getElementById("stu_education").innerHTML=result.stu_education;
                }
                if(result.stu_inway!='0'){
                    document.getElementById("stu_inway").innerHTML=result.stu_inway;
                }
                if(result.stu_resume_community_description!='0'){
                    document.getElementById("stu_resume_community_description").innerHTML=result.stu_resume_community_description;
                }

                if(result.stu_resume_search!='0'){
                    document.getElementById("stu_resume_search").innerHTML=result.stu_resume_search;
                }
                if(result.stu_resume_salary!='0'){
                    document.getElementById("stu_resume_salary").innerHTML=result.stu_resume_salary;
                }
                if(result.stu_resume_address!='0'){
                    document.getElementById("stu_resume_address").innerHTML=result.stu_resume_address;
                }

                if(result.stu_resume_practice_description!='0'){
                    document.getElementById("stu_resume_practice_description").innerHTML=result.stu_resume_practice_description;
                }

                if(result.stu_resume_skills!='0'){
                    document.getElementById("stu_resume_skills").innerHTML=result.stu_resume_skills;
                }

            }
        },
        error : function(data) {

        }
    });
}


function rebackOnlineApplication(event,i){
    var stu_acount = event;
    var html = $("#stuFor"+i+" span").html();

    var htmlarr = html.split("：");
    wangshenjob=htmlarr[1];
    $.ajax({
        url : "/compOperat/rebackOnlineApplication?stu_acount="+stu_acount+"&wangshenjob="+wangshenjob,//url 统一资源定位符
        type : "POST",
        success : function(result) {

            if(result == '撤销成功'){
                swal("撤销成功!", "您撤销了对该学生的拒绝操作", "success");
            }else{
                swal("撤销失败", "请检查网络设置或者联系管理员", "error");
            }
        },
        error : function(data) {

        }
    });

}
function  disOnlineApplication(event,i) {
    var stu_acount = event;
    var html = $("#stuFor"+i+" span").html();

    var htmlarr = html.split("：");
    wangshenjob=htmlarr[1];
    $.ajax({
        url : "/compOperat/disOnlineApplication?stu_acount="+stu_acount+"&wangshenjob="+wangshenjob,//url 统一资源定位符
        type : "POST",
        success : function(result) {

            if(result == '拒绝成功'){
                swal("拒绝成功!", "你拒绝了该学生的招聘申请，如需撤回，可进行撤回操作", "success");
            }else{
                swal("拒绝失败", "请检查网络设置或者联系管理员", "error");
            }
        },
        error : function(data) {

        }
    });
}

function agreeOnlineApplication(event,i) {
    var stu_acount = event;
    var html = $("#stuFor"+i+" span").html();

    var htmlarr = html.split("：");
    wangshenjob=htmlarr[1];

    $.ajax({
        url : "/compOperat/agreeOnlineApplication?stu_acount="+stu_acount+"&wangshenjob="+wangshenjob,//url 统一资源定位符
        type : "POST",
        success : function(result) {

            if(result == '同意成功'){
                swal("同意成功!", "你同意了该学生的招聘申请", "success");
                location.reload();
            }else{
                swal("同意失败", "请检查网络设置或者联系管理员", "error");
            }
        },
        error : function(data) {

        }
    });
}
